#ifndef LIVEWINDOW_H
#define LIVEWINDOW_H

#include <QWidget>

class LiveWindow : public QWidget
{
    Q_OBJECT
public:
    explicit LiveWindow(QWidget* parent = nullptr, Qt::WindowFlags f = Qt::WindowFlags());

    const QList<QWidget*>& views() const { return views_; }
    void setCurrent(int current);
    void addView(QWidget* view, const QString& label);

protected:
    void resizeEvent(QResizeEvent* event) override;
    void closeEvent(QCloseEvent* event) override;
    void keyPressEvent(QKeyEvent* event) override;

private:
    QList<QWidget*> views_;
    int current_ = 0;
};

#endif // LIVEWINDOW_H
